Media Asset parameter in iReport

N4 enables you to add media files, such as images and company logos to report designs that you create using iReport. You can use the Add/modify parameter form in iReport to define a new parameter. For more information on iReport, go to http://ireport.sourceforge.net/.

To define the media asset parameter in iReport:

  1. Add a parameter with the same name as the ID of the media asset in N4.

For more information on adding a media asset to N4, see Media Asset form (on page 1).

  1. From the Parameter Class Type field, select the java.awt.Image class for the media asset parameter.

If the class is not listed in the drop-down list, enter the class name as shown above.

  1. Place an Image object in the report design where you want the media asset to display.

  2. Double-click the Image object.

  3. On the Image, in the Image Expression field, enter the parameter name.

$P{<parameter name>}

The <parameter name> in the above line of code must be the same as the ID of the media asset that you define in the Media Asset form in N4.

  1. From the Image Expression Class list, select the java.awt.Image class.

Close the properties dialog box.